home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
art&graf.ix
/
art-0039
/
degascon.doc
< prev
next >
Wrap
Text File
|
1997-04-16
|
8KB
|
216 lines
Degas Convert & Print Program
-----------------------------
Graham Miller
21 Elm Road,
Winwick,
Warrington,
Cheshire WA2 9TW
Feel free to write to me with any comments on the program,
improvements to it, Modula-2 programming or programming in
general. I will reply to all letters.
If anyone sends me details of other picture formats on the
ST. I will try and arrange for DegasConvert to load &
convert them.
A reminder: The program and the source code are public
domain. You will need the FTL Modula2 compiler
and assembler if you wish to use the source code
'as is'.
Version 2.04 Amendement September 1989.
-----------------------
Differences from Version 2.03:
Load compressed DEGAS pictures and pictures saved
from LOGO.
This version should run on an ST with 512K of memory.
Due to a misunderstanding between myself and the
Modula-2 linker, version 2.03 will not run correctly
on a 'small' ST.
Version 2.03 Amendments:
------------------------
1) Its quicker!
Ver 2.02 Ver 2.03+
-------- --------
Low-res pic 19 secs 10 secs
Med-res pic 24 secs 17 secs
Some notes on the speed: This program converts about 6400
low-res pixels per second ( 7500 med-res pixels/sec ).
This is enough time for about 200 machine instructions
per pixel.
2) The palette is displayed in intensity order when
shown.
3) Equal entries in the palette are assigned the same
print bit pattern when the picture is first loaded.
It does this by using the lighter of the colours for
the lighter half of the palette and the darker pattern
in the lower half.
4) The following picture types are known and loaded correctly
by the program:- a) Degas ( PI1, PI2 & PI3 )
b) Tny ( TNY, TN1, TN2 & TN3 )
c) Neo ( NEO )
d) Doodle ( DOO )
e) Compressed Degas ( PC1, PC2, PC3 )
f) Pictures saved from LOGO ( PIC ).
If a picture type is not one of the above but is the
same size as a degas picture file then it will be treated
as such and loaded.
Purpose of the program.
-----------------------
To convert any Degas picture to hi-resolution and print the
converted picture on an Epson or compatible dot-matrix printer.
It will also save a selected portion of a picture as a '.IMG' file.
Instructions for use.
--------------------
You need the resource file 'DCRSC.RSC' on the same disc as the
program DEGASCON.PRG.
The program will work in High & Medium resolution.
What you can do:
----------------
1) Load a picture: Degas or any known picture.
2) Save the converted picture as a DEGAS hi-res picture.
3) Assign different patterns to each palette colour:
a) Use the 'PATTERNS...' option on the PICTURE menu.
b) click with the left button anywhere in the window. A
dialog is entered which will show the colour of the pixel
that the mouse is on, and the current print pattern
associated with it. Edit the print pattern to change it.
Use the CONVERT option on the PICTURE menu to
re-convert the picture with the new pattern(s).
4) Select a portion of the picture to be printed.
a) press the 'ESC' key ( or use the 'Image' menu option )
You will see a full screen display with a default selected
portion of the picture in the middle of the screen.
Click and hold in the box to drag it about the picture.
The box can be re-sized by clicking and dragging in the
lower-right corner.
Click with the LEFT button anywhere outside the box to
accept it. Click on the RIGHT button to cancel this
display and return to to the main display.
The co-ordinates and size of the accepted box will
update the co-ordinates in the SIZE option on the
PRINT menu. The print size will be made the same
as the box size, i.e. the printed picture will
not be scaled.
5) Scale the picture when it is printed.
a) Select the SIZE option on the PRINT menu.
This displays a dialog with the co-ordinates and size
of the selected picture ( full size by default ).
Also the current size of the picture when printed
is displayed. If these values are changed then the
picture will be scaled by the appropriate amount
when printed.
The starting co-ordinates ( in character positions )
of the printed picture on the page can be altered on this
dialog.
6) To print the picture, select PRINT from the PRINT menu.
Also select the direction to be printed ( Landscape or Portrait)
7) To save the selected portion of the picture as a '.IMG' file
suitable for importing into DTP packages. Click on
'Image...' in the FILE menu. You must select a portion
of the picture first. If you don't do this, the full
picture is selected as an 'IMG' file.
-------------------------//-----------------------
Assigning different print patterns to the colours:
Wot happens on loading a picture:
When a picture is loaded each colour used in the picture
is assigned a pattern of dots ( four dots for a low-res picture,
two dots for a med-res picture ). The number of dots in the
pattern is decided mainly by the brightness of the colour. Also
each colour gets a different pattern of dots. Equal colour entries
in the palette are then given the same print bit pattern from the
previous/next entry depending on which half the palette is in.
How to change the print patterns:
---------------------------------
On the PICTURE menu there is the option PATTERNS...,
clicking on this throws up a dialog for the current settings.
Each entry consists of three parts: RGB ( Red, Green & Blue
components of the colour in that position in the palette ), the
index number of the palette entry ( where it is in the palette )
& the Print Bit Patterns associated with this colour. This
consists of a series of 1's and 0's. A '1' indicates a dot will
be printed, a '0' indicates no dot. There are four dots to be
printed for each low-res picture pixel and all sixteen colours
are used. In a med-res picture, the are two dots printed for each
pixel and only the first four entries are used.
To change a pattern, edit the Print Bit Pattern with
the appropriate series of 1's & 0's. If you exit the dialog by
pressing ENTER or clicking on the CONVERT box, the picture will be
reconverted using the latest patterns. Clicking on the CANCEL
button will ignore the changes made during this use of the
dialog.
To stop a print partway through then click on any mouse
button. You will be prompted whether to abort the print or not.
If your printer is offline then after about 30 seconds you will get
an alert prompting you about it.
Some features ( if they are documented they are not bugs! well,
maybe... )
When non-integer scaling is used in the print, the picture can
sometimes look very odd. I cannot find anything obviously wrong
with the scaling routines and suspect the effects are artifacts
of the technique I have used ( This means I don't know why it
looks odd! ).
------------------------------//-----------------------------
This version was programmed in FTL Modula-2 from HiSoft. This
is an excellent implementation and development environment.
Graham Miller